public class PrintPrime {
    public static void main(String[] args) {
        int n = 1;
        for(n = 1;n <= 100;n++) {
            int i = 2;
            boolean a = true;
            while(i <= n/2) {
                if(n%i == 0) {
                    a = false;
                    break;
                }
                i++;
            }
            if(a) {
                System.out.print(n+" ");
            }
        }
    }
}
